package com.chen.mapper;

import com.chen.entity.Contents;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Y·C
 * @since 2023-04-23
 */
public interface ContentsMapper extends BaseMapper<Contents> {

    @Select("SELECT cs.id , cs.content,cs.cover_url,cs.create_time,cs.title,cs.video_url,cs.cover_url,cs.mid ,cy.`name`,cs.img_url FROM `contents` cs left JOIN classify cy on cs.mid = cy.mid")
    List<Contents> selectAllList();
}
